package top.zuli.package03.exam01;

/*public class FuShuException extends RuntimeException {

    private static final long serialVersionUID = 1L;
    public FuShuException() {
    }
    public FuShuException(String message) {
        super(message);
    }
}
class FuShuExceptionTest {
    public static double getSalary(double money) {
        if(money<0) {
            throw new FuShuException("工资不能为负数");
        }
        return money;
    }
    public static void main(String[] args) {
        getSalary(-10);
    }
}*/
/*
public class FuShuException extends RuntimeException {

    private static final long serialVersionUID = 1L;
    public FuShuException() {
    }
    public FuShuException(String message) {
        super(message);
    }
}
class FuShuExceptionTest {
    public static double getSalary(double money) {
        if(money<0) {
            throw new FuShuException("工资不能为负数");
        }
        return money;
    }
    public static void main(String[] args) {
        getSalary(-10);
    }
}
*/
public class FuShuException extends RuntimeException {

    private static final long serialVersionUID = 1L;
    public FuShuException() {
    }
    public FuShuException(String message) {
        super(message);
    }
}
class FuShuExceptionTest {
    public static double getSalary(double money) {
        if(money<0) {
            throw new FuShuException("工资不能为负数");
        }
        return money;
    }
    public static void main(String[] args) {
        getSalary(-10);
    }
}
